package cn.gok.service.impl;

import cn.gok.entity.Exc;
import cn.gok.mapper.ExcMapper;
import cn.gok.service.ExcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class ExcServiceImpl implements ExcService {
    @Autowired(required = false)
    private ExcMapper excelsMapper;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<Exc> findAll() {
        return excelsMapper.findAll();
    }

    @Override
    public void update(List<Exc> exc) {
        exc.forEach(excels->{
            excelsMapper.update(excels);
        });
    }


}
